package org.mathcloud.math.core.generic.operator;

import org.mathcloud.math.core.common.operator.UnaryOperator;
import org.mathcloud.math.core.common.quantity.QuantityObject;
import org.mathcloud.math.core.common.signature.QuantityObjectSignature;
import org.mathcloud.math.core.generic.signature.GenericOperatorObjectSignature;
import org.webequa.core.generic.operator.GenericOperator;


public abstract class GenericUnaryOperator extends GenericOperator 
implements UnaryOperator
{	
	public GenericUnaryOperator()
	{
		signature = new GenericOperatorObjectSignature(1,null,"generic");		
	}
	
	@Override
	public QuantityObject getOperand()
	{
		return operand;
	}

	@Override
	public void setInputParams(QuantityObject in)
	{
		operand = in;
	}

	@Override
	public QuantityObjectSignature getResultSignature()
	{
		if (res!=null)
			return res.getSignature();
		else if (operand!=null)
			return operand.getSignature();
		else return null;
	}	
  
	protected QuantityObject operand;	
}
